home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1998 July
/
EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso
/
earcd
/
ppaint64
/
rexx
/
animtoanimbrush.pprx
< prev
next >
Wrap
Text File
|
1996-06-17
|
1KB
|
84 lines
/* PPaint Amiga Rexx script - Copyright © 1995 Cloanto Italia srl */
/*
$VER: AnimToAnimBrush.pprx 1.0
This script converts an animation into an Anim-Brush.
For more information, or suggestions, please address E-mail to
<info@cloanto.com>
*/
MYPORT = 'PPAINT'
IF ~SHOW('P', MYPORT) THEN DO
IF EXISTS('PPaint:PPaint') THEN DO
ADDRESS COMMAND 'Run >NIL: PPaint:PPaint'
DO 30 WHILE ~SHOW('P',MYPORT)
ADDRESS COMMAND 'Wait >NIL: 1 SEC'
END
END
ELSE DO
SAY "Personal Paint could not be loaded."
EXIT 10
END
END
IF ~SHOW('P', MYPORT) THEN DO
SAY 'Personal Paint Rexx port could not be opened.'
EXIT 10
END
ADDRESS VALUE MYPORT
OPTIONS RESULTS
OPTIONS FAILAT 10000
Version 'REXX'
IF RESULT < 4 THEN DO
errmess = 'This script requires a newer_version of Personal Paint.'
SAY errmess
RequestNotify 'PROMPT="'errmess'"'
EXIT 10
END
FreeBrush
IF RC ~= 0 THEN EXIT RC
LockGUI
loaded = 0
GetFrameNum
frnum = RESULT
IF frnum = 0 THEN DO
LoadAnim NEW
IF RC = 0 THEN DO
GetFrameNum
frnum = RESULT
loaded = 1
END
END
IF frnum > 0 THEN DO
Get SETTING IMAGEW
x1 = RESULT - 1
Get SETTING IMAGEH
y1 = RESULT - 1
GetFramePos
fpos = RESULT
SetFramePos 1
GetRectBrush 0 0 x1 y1 FRAMES frnum
SetFramePos fpos
IF RC = 0 THEN
SaveAnimBrush
FreeBrush FORCE
END
IF loaded THEN DO
DelFrames ALL FORCE
ClearImage FORCE
END
UnlockGUI